package net.lab1024.sa.admin.module.exam.dao;

import java.util.List;
import net.lab1024.sa.admin.module.exam.domain.entity.QuestionEntity;
import net.lab1024.sa.admin.module.exam.domain.form.QuestionQueryForm;
import net.lab1024.sa.admin.module.exam.domain.vo.QuestionVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 试题表 Dao
 *
 * @Author cfsjiazy
 * @Date 2025-10-20 16:36:35
 * @Copyright 1.0
 */

@Mapper
public interface QuestionDao extends BaseMapper<QuestionEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<QuestionVO> queryPage(Page page, @Param("queryForm") QuestionQueryForm queryForm);

    /**
     * 更新删除状态
     */
    long updateDeleted(@Param("id")Long id,@Param("deletedFlag")boolean deletedFlag);

    /**
     * 批量更新删除状态
     */
    void batchUpdateDeleted(@Param("idList")List<Long> idList,@Param("deletedFlag")boolean deletedFlag);

}
